<?php

namespace App\Providers;

use App\Http\Constants\CreditsAdminOplogConstants;
use App\Http\Services\Admin\AdminOplogConvert\ModulesApplicationConvert;
use App\Http\Services\Admin\AdminOplogConvert\ModulesClosingConvert;
use App\Http\Services\Admin\AdminOplogConvert\ModulesCodingConvert;
use App\Http\Services\Admin\AdminOplogConvert\ModulesJobsConvert;
use App\Http\Services\Admin\AdminOplogConvert\ModulesManageConvert;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;

class CreditsAdminOplogProvider extends ServiceProvider implements DeferrableProvider
{
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton(CreditsAdminOplogConstants::MODULES_APPLICATION,function ($app,$data){return new ModulesApplicationConvert($data);});
        $this->app->singleton(CreditsAdminOplogConstants::MODULES_CLOSING,function ($app,$data){return new ModulesClosingConvert($data);});
        $this->app->singleton(CreditsAdminOplogConstants::MODULES_CODING,function ($app,$data){return new ModulesCodingConvert($data);});
        $this->app->singleton(CreditsAdminOplogConstants::MODULES_MANAGE,function ($app,$data){return new ModulesManageConvert($data);});
        $this->app->singleton(CreditsAdminOplogConstants::MODULES_JOBS,function ($app,$data){return new ModulesJobsConvert($data);});
    }

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    public function provides()
    {
        return [
            CreditsAdminOplogConstants::MODULES_APPLICATION,
            CreditsAdminOplogConstants::MODULES_CLOSING,
            CreditsAdminOplogConstants::MODULES_CODING,
            CreditsAdminOplogConstants::MODULES_MANAGE,
            CreditsAdminOplogConstants::MODULES_JOBS,
            ];
    }
}
